package com.zxy.demo.task.entity;

import com.zxy.demo.common.utils.CommandUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;

/**
 * windows 自动关机--延迟1分钟
 *
 * @author ZENG.XIAO.YAN
 * @version 1.0
 * @Date 2022/2/23
 */
public class WindowsShutdown60S extends BaseTask{
    private Logger log = LoggerFactory.getLogger(getClass());
    @Override
    public void runTask() {
        log.info("执行定义关机任务");
        String[] cmds = {"cmd.exe","/c", "Shutdown /s /t 60"};
        CommandUtils.execCmd(Arrays.asList(cmds));
    }
}
